package com.ciaojian.core.model.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ciaojian.core.enums.business.CheckUserClockTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @Description: 打开记录
 * @Author: xiangchao
 * @Date: 2020/11/9 4:14 下午
 */
@Data
@Accessors(chain = true)
@TableName("d_check_user")
public class CheckUser extends Model<CheckUser> {
    @ApiModelProperty(value = "打开记录ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "日期")
    private String date;

    @ApiModelProperty(value = "时间")
    private String time;

    @ApiModelProperty(value = "类型：上班打卡/下班打卡", required = true)
    @NotBlank(message = "类型不能为空")
    private String type;

    @ApiModelProperty(value = "发型师ID", required = true)
    @NotBlank(message = "发型师ID不能为空")
    private Integer userId;

    /**
     * 门店ID
     */
    private Integer storeId;

    @ApiModelProperty(value = "地址", required = true)
    @NotBlank(message = "地址不能为空")
    private String address;

    @ApiModelProperty(value = "备注")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty(value = "距离", required = true)
    @NotBlank(message = "距离不能为空")
    private String distance;

    @ApiModelProperty("距离文本")
    @TableField("distanceText")
    private String distanceText;

    @ApiModelProperty(value = "纬度", required = true)
    @NotBlank(message = "纬度不能为空")
    private String lat;

    @ApiModelProperty(value = "经度", required = true)
    @NotBlank(message = "经度不能为空")
    private String lng;

    @ApiModelProperty(value = "图片")
    private String img;

    @ApiModelProperty(value = "必须时间")
    private String needTime;

    @ApiModelProperty("打卡类型")
    private CheckUserClockTypeEnum clockType;


    @TableField(exist = false)
    private Date curDate;
}
